/*
 * Copyright (C) 2011, EADS France
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */

package xowl.interpreter.impl;

import xowl.interpreter.XOWLException;

/**
 *
 * @author Laurent WOUTERS
 */
public class StatementJavaInvokationRunner extends StatementRunner {
    private xowl.lang.interop.JavaInvokation statement;

    public StatementJavaInvokationRunner(xowl.lang.interop.JavaInvokation statement, ThreadRunner runner) {
        super(runner);
        this.statement = statement;
    }

    @Override public String getFile() { return statement.getFile(); }
    @Override public int getLine() { return statement.getLine(); }
    @Override public void execute() throws XOWLException {
        runner.evaluator.evaluate(runner.evaluator, statement);
        runner.statementPop();
    }
    @Override public boolean onBreak() { return true; }
}
